package com.ruoyi.system.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备报警数据对象 mr_device_alarm_data
 *
 * @author lsw
 * @date 2024-01-03
 */
@Setter
@Getter
public class MrDeviceAlarmDataVO extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增id */
    private Long id;

    /** 显示的名称 */
    @Excel(name = "报警名称", width = 24)
    private String deviceName;

    /** 报警动作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报警动作时间", width = 22, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date alarmTime;

    /** 显示的内容 */
    @Excel(name = "报警动作的内容", width = 24)
    private String content;

    /** 设备地址代号_序号 */
    @Excel(name = "设备地址代号_序号")
    private String deviceCode;

    /** 单位 */
    private String unit;

    /** 报警显示灯 */
    private String alarmDisplayLight;

    /** 排序 */
    private String sort;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("deviceCode", getDeviceCode())
                .append("deviceName", getDeviceName())
                .append("content", getContent())
                .append("unit", getUnit())
                .append("alarmDisplayLight", getAlarmDisplayLight())
                .append("sort", getSort())
                .append("alarmTime", getAlarmTime())
                .toString();
    }
}

